package cn.hyy;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableFeignClients //开启feign的支持
public class ConsumerApplication_Feign {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication_Feign.class, args);
    }

    /**
     * Feign的底层是Ribbon，也可以通过配置IRule配置负载均衡的策略
     * 写了随机  不写默认循环
     * @return
     */
    /*@Bean
    public IRule iRule(){
        return new RandomRule();
    }*/

}
